A. Field of the Invention
The present invention relates to methods and systems for managing memory, and, more particularly, for managing objects instantiated in memory.
B. Description of the Related Art
An object-oriented program controlled system, at its basic level, concerns objects, messages, and the interaction between the two. Objects typically include two types of data: private data and public data. Private data is used by the object alone, while public data is shared data accessed through the object's service interface. The objects send messages to each other to execute processes in the object-oriented program controlled system. Objects may send messages by invoking the object's member functions included in the object's service interface.
Objects are long-lived, as compared to messages, and require space in memory. Typical object-oriented program controlled systems allocate the memory required for each object at the time of creation of the object. However, since such systems create objects frequently for each new or different required functionality, the system must conserve memory space. If the memory resources become totally exhausted, further processing will be impossible. Object-oriented program controlled systems typically use a memory manager to help conserve memory space during processing.
Traditional memory managers require client applications to specify the amount of memory that they will need for a given processing procedure. The memory manager then allocates an amount of raw memory to each client application and provides the client application with the address of the client application's allocated memory block. In this way, the memory manager provides protection against another application overrunning the client application's allocated memory block. While this may be satisfactory for conventional procedural program systems, a more robust system is needed for object-oriented program controlled systems. In particular, it is desirable to have a memory management system that manages the objects as well as the system memory.